<?php
/*
 * @Description    : 
 * @Version        : 1.0.0
 * @Author         : QianLong
 * @Date           : 2020-03-09 21:36:13
 * @LastEditors    : QianLong
 * @LastEditTime   : 2023-10-25 10:23:15
 */

declare(strict_types=1);

namespace App\Job\Getui;

use App\Service\Getui;
use Hyperf\AsyncQueue\Job;

class listPushStartPageJob extends Job
{
    public $params;

    public function __construct($params)
    {
        $this->params = $params;
    }

    public function handle()
    {
        if (isset($this->params['appType']) && !empty($this->params['appType'])) {
            $enterprise = new Getui($this->params['appType']);
        }else{
            $enterprise = new Getui();
        }
        $result = $enterprise->listPushStartPageTask($this->params);
        if($result['code'] == 200){
            $this->params['taskid'] = $result['data'];
            $result = $enterprise->listPushStartPage($this->params);
        }else{
        }
        unset($this->params,$enterprise);
    }
}
